filename1 = 'python/chapter10/cats.txt'
filename2 = 'python/chapter10/dogs.txt'

try:
    filename = filename1
    with open(filename) as f1:
        cats = f1.read()

    filename = filename2
    with open(filename) as f2:
        dogs = f2.read()

except FileNotFoundError:
    print(f"{filename} is not exist!")
else:
    print(cats)
    print(dogs)